home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / pc / pm65sdk / sourcecode / includes / cihyphenation.h < prev    next >
C/C++ Source or Header  |  1996-11-18  |  5KB  |  103 lines

  1. /**[f******************************************************************
  2.  *      CIBasic.h -- CIBasic Interface definition
  3.  *
  4.  *      Copyright (c) 1996 Adobe Systems, Inc. All Rights Reserved
  5.  *
  6.  *      
  7.  * ABSTRACT:  
  8.  *
  9.  * USAGE: 
  10.  *
  11.  * ROUTINES DEFINED:
  12.  * $Revision:   1.1  $
  13.  *
  14.  *
  15.  *
  16.  **f]******************************************************************/ 
  17. #ifndef _CIHYPH_H
  18. #define _CIHYPH_H
  19.  
  20. #if     !defined(LANDID)
  21.     #define LANGID  unsigned short          // 16 bit language id
  22.  
  23.     /*** NOTE:  
  24.      ***            These IDs are arbitrarily defined by Adobe.  This is not
  25.      ***            a commitment that Adobe currently supports all the listed
  26.      ***            languages - only that some preparations are being made
  27.      ***            to support such languages in the future.
  28.      ***
  29.      ***            Please do not shuffle them.  Add new ones to the end.
  30.      ***/
  31.     #define LANGUAGE_AMERICAN                               1               // American English
  32.     #define LANGUAGE_BRITISH                                2               // British English
  33.     #define LANGUAGE_AUSTRALIAN                             3               // Australian English
  34.     #define LANGUAGE_GERMAN                                 4
  35.     #define LANGUAGE_SWISS_GERMAN                   5 
  36.     #define LANGUAGE_FRENCH                                 6
  37.     #define LANGUAGE_CANADIAN_FRENCH                7
  38.     #define LANGUAGE_SWISS_FRENCH                   8
  39.     #define LANGUAGE_SPANISH                                9               // Castillian Spanish
  40.     #define LANGUAGE_LATIN_SPANISH                  10              // Latin American Spanish
  41.     #define LANGUAGE_ITALIAN                                11
  42.     #define LANGUAGE_DANISH                                 12 
  43.     #define LANGUAGE_SWEDISH                                13
  44.     #define LANGUAGE_NORWEGIAN                              14
  45.     #define LANGUAGE_NYNORSK                                15              // Norwegian dialect
  46.     #define LANGUAGE_FINNISH                                16
  47.     #define LANGUAGE_DUTCH                                  17       
  48.     #define LANGUAGE_PORTUGUESE                     18
  49.     #define LANGUAGE_BRAZILIAN                              19              // Brazilian Protuguese
  50.     #define LANGUAGE_RUSSIAN                                20
  51.     #define LANGUAGE_UKRAINIAN                              21
  52.     #define LANGUAGE_BYELORUSSIAN                   22
  53.     #define LANGUAGE_SERBOCROAT                             23
  54.     #define LANGUAGE_CZECH                                  24
  55.     #define LANGUAGE_SLOVAK                                 25
  56.     #define LANGUAGE_LITHUANIAN                             26
  57.     #define LANGUAGE_LATVIAN                                27
  58.     #define LANGUAGE_ESTONIAN                               28
  59.     #define LANGUAGE_POLISH                                 29
  60.     #define LANGUAGE_HUNGARIAN                              30
  61.     #define LANGUAGE_BULGARIAN                              31
  62.     #define LANGUAGE_ROMANIAN                               32
  63.     #define LANGUAGE_TURKISH                                33
  64.     #define LANGUAGE_GREEK                                  34
  65.     #define LANGUAGE_AFRIKAANS                              35
  66.     #define LANGUAGE_JAPANESE                               36
  67.     #define LANGUAGE_CHINESE_TRADITIONAL    37
  68.     #define LANGUAGE_CHINESE_SIMPLIFIED             38
  69.     #define LANGUAGE_KOREAN                                 39
  70.     #define LANGUAGE_CATALANS                               40
  71. #endif
  72.  
  73. #if (!defined(PA_DICTHYPH) && !defined(PA_ALGHYPH))
  74. // method
  75. #define PA_DICTHYPH     0x10    /* T if hyphenation should use dictionary */
  76. #define PA_ALGHYPH      0x20    /* T if hyphenation should be algorithmic */
  77. #endif
  78.  
  79. #if (!defined(HY_NORM) && !defined(HY_PREF))
  80. #define HY_NORM         0x04            // Normal point
  81. #define HY_PREF         0x05            // Preferred point, use if possible
  82. #endif
  83.  
  84. // Word buffer is a read only field. In other word, plugin can not modify the
  85. // word. Plug in can override hyphenation points. Hyphenation points can be 
  86. // HY_NORM or HY_PREF.  HY_PREF is the most preferred hyphenation spot.
  87. // HY_NORM is the normal hyphenation spot. For example, the wordBuf
  88. // "hyphenation", wordLen is 11. The hyphenation point is at *pHyphPoints[1] 
  89. // and *pHyphPoints[5] ("hy-phen-ation"). The marked hyphenation points will either be HY_NORM
  90. // or HY_PREF (i.e. *pHyphPoints[1] and *pHyphPoints[5] is either HY_PREF
  91. // or HY_NORM). Plugin can modify the hyphenation points and returned event
  92. // is handled by plugin so PageMaker will use the new hyphenation map.
  93.  
  94. typedef struct _PMHyphenateRec {
  95.     LANGID          language;
  96.     unsigned short            method;                 // either PA_DICTHYPH or PA_ALGHYPH
  97.     unsigned char            *pWordBuf;              // word to hyphenation
  98.     unsigned short            *pWordLen;              // word length
  99.     unsigned char            *pHyphPoints;           // hyphenation points (HY_NORM or HY_PREF)
  100. } PMHyphenateRec, *PPMHyphenateRec;
  101.  
  102. #endif
  103.